package org.bw.bookstore.common.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Entity;
import javax.persistence.Transient;
import java.io.Serializable;
import java.util.Date;

/**
 *@program: wisdom_bookstore
 *@description: 盘点任务实体类
 *@Author: 孙冬雪
 *@Date: 2020-10-22 09:50
 */
@Data
@ToString
@AllArgsConstructor
@NoArgsConstructor
@Entity
@TableName("tb_inventory_task")
public class TbInventoryTask extends BaseEntity implements Serializable {


    /**
     * bookDetailedCode: 图书详情标识
     **/
    private String bookDetailedCode;

    /**
     * finishStatus: 完成状态（0：未完成，1：已完成）
     **/
    private Integer finishStatus;

    /**
     * 盘点规则
     *
     * @Author 孙冬雪
     * @Date 2020/10/21 15:30
     **/
    private String inventoryRulesCode;

    /**
     * 盘点时间
     *
     * @Author 孙冬雪
     * @Date 2020/10/21 14:51
     **/
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date inventoryTime;

    /**
     * 一个盘点任务执行于一个盘点规则
     *
     * @Author 孙冬雪
     * @Date 2020/10/21 15:31
     **/
    @TableField(exist = false)
    @Transient
    private TbInventoryRules tbInventoryRules;

    @Transient
    @TableField(exist = false)
    private String bookName;

}
